package com.ruoyi.bus.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bus.mapper.WitIntoCarRecordMapper;
import com.ruoyi.bus.domain.WitIntoCarRecord;
import com.ruoyi.bus.service.IWitIntoCarRecordService;

/**
 * 上车记录表Service业务层处理
 * 
 * @author caiyanshan
 * @date 2021-07-29
 */
@Service
public class WitIntoCarRecordServiceImpl implements IWitIntoCarRecordService 
{
    @Autowired
    private WitIntoCarRecordMapper witIntoCarRecordMapper;

    /**
     * 查询上车记录表
     * 
     * @param recordId 上车记录表ID
     * @return 上车记录表
     */
    @Override
    public WitIntoCarRecord selectWitIntoCarRecordById(Long recordId)
    {
        return witIntoCarRecordMapper.selectWitIntoCarRecordById(recordId);
    }

    /**
     * 查询上车记录表列表
     * 
     * @param witIntoCarRecord 上车记录表
     * @return 上车记录表
     */
    @Override
    public List<WitIntoCarRecord> selectWitIntoCarRecordList(WitIntoCarRecord witIntoCarRecord)
    {
        return witIntoCarRecordMapper.selectWitIntoCarRecordList(witIntoCarRecord);
    }

    /**
     * 新增上车记录表
     * 
     * @param witIntoCarRecord 上车记录表
     * @return 结果
     */
    @Override
    public int insertWitIntoCarRecord(WitIntoCarRecord witIntoCarRecord)
    {
        witIntoCarRecord.setCreateTime(DateUtils.getNowDate());
        return witIntoCarRecordMapper.insertWitIntoCarRecord(witIntoCarRecord);
    }

    /**
     * 修改上车记录表
     * 
     * @param witIntoCarRecord 上车记录表
     * @return 结果
     */
    @Override
    public int updateWitIntoCarRecord(WitIntoCarRecord witIntoCarRecord)
    {
        return witIntoCarRecordMapper.updateWitIntoCarRecord(witIntoCarRecord);
    }

    /**
     * 批量删除上车记录表
     * 
     * @param recordIds 需要删除的上车记录表ID
     * @return 结果
     */
    @Override
    public int deleteWitIntoCarRecordByIds(Long[] recordIds)
    {
        return witIntoCarRecordMapper.deleteWitIntoCarRecordByIds(recordIds);
    }

    /**
     * 删除上车记录表信息
     * 
     * @param recordId 上车记录表ID
     * @return 结果
     */
    @Override
    public int deleteWitIntoCarRecordById(Long recordId)
    {
        return witIntoCarRecordMapper.deleteWitIntoCarRecordById(recordId);
    }
}
